<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	
		<style>
div{
width:600px;
overflow:auto;
background:#ccc;
}

p{
        width:auto;
        margin:10px;
        background:red;
}
</style>
</head>
<body>

<div>
    <p>123</p>
</div>

</body>
</html>
